# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=luyten
pkgver=0.5.4
pkgrel=1
groups=('blackarch' 'blackarch-decompiler' 'blackarch-misc')
pkgdesc='An Open Source Java Decompiler Gui for Procyon.'
arch=('any')
url='https://github.com/deathmarine/Luyten'
license=('APACHE')
depends=('java-environment')
makedepends=('git')
source=("https://github.com/deathmarine/Luyten/releases/download/v$pkgver/$pkgname-$pkgver.jar")
sha512sums=('87a6a66122222a8d0dea466607131cd7148300d487b68f87b0c453e64865c5919b1690f01cda52b40faf3008c1b0c01e8189c5967d2e64bab60245f8964cfdd7')
noextract=("$pkgname-$pkgver.jar")

package() {
  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 644 "$pkgname-$pkgver.jar" \
    "$pkgdir/usr/share/$pkgname/$pkgname-$pkgver.jar"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec java -jar /usr/share/$pkgname/$pkgname-$pkgver.jar "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

